Many image capture devices can record a signal dynamic range that is wider than a typical display device can render effectively. For example, consumer color negative films can record scene luminance range of 1000:1, but photographic color papers can only render a luminance range from 50:1 to 100:1. Another example is the storage phosphor used in digital radiography, which can capture an x-ray exposure dynamic range of 10,000:1, but a radiographic film as an output medium can render only a small fraction of it (about 20:1) in good contrast. In both examples, wide dynamic range images will suffer very significant loss of details in the highlight and the shadow, when they are displayed on their intended output media. Several inventions have been disclosed for solving such problems.
The best known method is the unsharp masking and its variations. U.S. Pat. No. 5,012,333 and U.S. Pat. No. 4,812,903 teach methods of decomposing an input image into a low-frequency component and a high-frequency component. By modifying the low-frequency component with a nonlinear tone scale curve and amplifying the high-frequency component (unsharp masking), one can combine the two modified components back to form a new image which has a smaller dynamic range and yet retain most image details. U.S. Pat. No. 5,608,813 and U.S. Pat. No. 5,454,044 teach a similar method, but formulates it in spatial domain. The low-frequency (unsharp) component is obtained by averaging image values over a local window. The low-frequency component is then used in a monotonically decreasing function to determine how much gray value is to be added or substracted from the original image. In essence, the method used the unsharp version of the original image to mask off the dynamic range in the input signal. These three methods are mathematically similar to the well known unsharp masking technique in photography, and all of them suffer from the same drawback of creating dark and bright banding around high-contrast edges as the unsharp masking technique does. The cause of this artifact is illustrated in FIG. 1. The unsharp (low-frequency) component rounds off a sharp edge signal to produce a smoothed version. The difference signal (the high-frequency component) between the original image and the unsharp version thus contains an overshoot and an undershoot around a sharp edge. When the difference signal (the high-frequency) is added back to the dynamic-range compressed low-frequency component, the uncompressed or amplified overshoot and undershoot signals around a sharp edge will create a bright band and a dark band near the edge. This artifact is more visible near high contrast edges. This artifact is called the edge banding artifact. The edge banding artifact is a very objectionable artifact in consumer images and a potentially dangerous artifact in digital radiography. In order to deal with this banding problem, U.S. Pat. No. 5,467,404 teaches a method of decomposing an image into multiple resolutions and using a predetermined nonlinear amplitude compression function for the high frequency component in each resolution. If the high frequency amplitude is small, it is passed unchanged or even amplified. If the high frequency amplitude is large, then it is attenuated. The assumption is that whenever the signal amplitude gets large, regardless of its cause, one should reduce its amplitude so that the overshoot and the undershoot near a sharp edge can be properly suppressed. A major deficiency of the method is that the amplitude in the each resolution alone can not be used to adequately identify whether the large amplitude is caused by a high contrast edge or an image texture. Without making the distinction, fine details and textures of high amplitudes will also be suppressed, resulting loss in details. A second major deficiency is that a predetermined nonlinear amplitude compression can not adaptively adjust the right amount of compression needed for edges in each resolution of image details at different spatial locations. Since every input image has a different dynamic range and thus requires varying amount of dynamic range compression. The amount of compression has to be coupled with how the algorithm adjusts the amplitude compression for each high frequency component. This need was mentioned in U.S. Pat. No. 5,493,622, but it did not teach how to compute the necessary tone compression curve, nor did it teach how the tone compression curve should be used to deal with the edge banding artifacts.
A third deficiency is that the frequency decomposition as described in U.S. Pat. No. 5,467,404 has to sum up pixel wise (after interpolation to the required number of pixels) to the original image when no modification is performed on any of the signal amplitudes in the decomposition. This constraint limits the types of detailed signals that can be extracted from the decomposition.
Another related approach to the frequency decomposition and modification method is the wavelet transform and inverse transform. For example, J. Lu, D. M. Healy, Jr., and J. B. Weaver disclosed such a method in the paper "Contrast enhancement of medical images using multiscale edge representation," Optical Engineering, 33, 7, 2151-2161, 1994.
A similar invention was also disclosed in U.S. Pat. No. 5,717,791. In these two prior arts, the goal was to adjust local image contrast through a multi resolution analysis. Although the multiscale edge structure used by both prior arts is indeed flexible and its proper use allows one to alleviate the third deficiency mentioned above, both prior arts still suffer the first two major deficiencies pointed out earlier: there was no explicit interaction between edges from different spatial scales and no explicit method to compute how much contrast should be adjusted. Both problems are solved in this new invention. A contrast gain-control (CGC) module in this new invention derives gain factors from edges of all scales and apply them to control how much edge information to add back to the image information at each scale. A tone scale curve (TSC) module in this new invention explicitly maps the input dynamic range to the dynamic range of the output medium. The details of these will be explained shortly in the following sections.
A different idea to deal with the edge banding artifact is disclosed in U.S. Pat. No. 5,471,987 and U.S. Pat. No. 5,786,870, where the unsharp (low frequency) component is calculated from a weighted average of a predetermined mask. The weighting is chosen so that less weight is applied to a given peripheral pixel in the mask if its absolute difference from the center pixel is large. The weighting is also chosen so that less weight is applied to a peripheral pixel if it is located farther away from the center pixel. By such a differential weighting scheme, pixels across a high contrast edge are not averaged together and therefore, the unsharp component has relatively sharp high contrast edges. If the image detail (high frequency) component is calculated by subtracting the unsharp component from the original image signal, then the image detail (high frequency) component will not have the overshoots or undershoots near a high contrast edge. Therefore, there will be no edge banding artifacts when the unsharp component and the image detail component are combined. This method is fairly effective. However, there are two major drawbacks in such a method. The first drawback is that it is very slow, because the weighted averaging operation is not a regular convolution operation. The second drawback is that the method can only deal with high contrast edges that have a short transition distance. If a luminance transition occurs continously over some longer distance, the absolute difference between the center pixel and its neighboring pixels will not be large, and therefore the weighting will be relatively uniform over the transition. The unsharp component will then be a blurred version of the original image and the image detail component will contain overshoots and undershoots which, when added back or enhanced, will be visible in the output image.